package thread.reentrantreadwritelock;

public class Client {

    public static void main(String[] args){
        ReentrantReadWriteLockTest reentrantReadWriteLockTest = new ReentrantReadWriteLockTest();
        //读取数据
        Thread threadA = new Thread(()->{
            try {
                reentrantReadWriteLockTest.readDate();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        //写数据
        Thread threadB = new Thread(()->{
            try {
                reentrantReadWriteLockTest.writeDate();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        //读数据
        Thread threadC = new Thread(()->{

            try {
                reentrantReadWriteLockTest.readDate();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });

        threadA.start();
        threadB.start();
     //   threadC.start();
    }
}
